home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
BBS
/
XX3401.ARJ
/
TESTCASE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-01-17
|
1KB
|
35 lines
program SearchTestCase;
uses
Search;
const
A1 : array[1..15] of char = 'abcdefghijklmno';
BEGIN
writeln('The position of cde in ', A1, ' should be 3');
writeln('The position of cde in ', A1, ' is ',
StrPos(A1, sizeof(A1), 'cde'));
writeln;
writeln('The position of lkj in ', A1, ' should be 0');
writeln('The position of lkj in ', A1, ' is ',
StrPos(A1, sizeof(A1), 'lkj'));
writeln;
writeln('The position of ijk in abcdefghij should be 0');
writeln('The position of ijk in abcdefghij is ', StrPos(A1, 10, 'ijk'));
writeln;
writeln('The position of abc in ', A1, ' should be 1');
writeln('The position of abc in ', A1, ' is ',
StrPos(A1, sizeof(A1), 'abc'));
writeln;
writeln('The position of abc in bcdefghij should be 0');
writeln('The position of abc in bcdefghij is ',
StrPos(A1[2], sizeof(A1) - 1, 'abc'));
writeln;
writeln('The position of mno in ', A1, ' should be 13');
writeln('The position of mno in ', A1, ' is ',
StrPos(A1, sizeof(A1), 'mno'));
END.